<template>
  <div class="contain" :style="{height:innerHeight -20 + 'px' }"></div>
</template>

<script>
export default {
    data () {
        return {
           innerHeight:window.innerHeight
        }
    },
    mounted(){
        window.onresize= () => {
            return (()=>{
                this.innerHeight = window.innerHeight
               
            })()
        }
    }
}
</script>

<style scoped>
.contain {
    width: 500px;
    height: 200px;
    background-color:#666;
}
</style>

